using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using System.Collections;
using System.Reflection;
using System.Data;using THSERP.BusinessEntities;using THSERP.BaseProvider;
using THSLib;using THSERP.BaseProvider;

namespace THSERP.Modules.Promotion
{
    public class ICProductsGridControl : THSGridControl 
    {
        public override void InitGridControlDataSource()
        {
            PromotionEntities entity = (PromotionEntities)((BaseModuleERP)Screen.Module).CurrentModuleEntity;
            BindingSource bds = new BindingSource();
            bds.DataSource = entity.ICProductsList;
            this.DataSource = bds;
        }

        protected override DevExpress.XtraGrid.Views.Grid.GridView InitializeGridView()
        {
            DevExpress.XtraGrid.Views.Grid.GridView gridView = base.InitializeGridView();
            DevExpress.XtraGrid.Columns.GridColumn column = new DevExpress.XtraGrid.Columns.GridColumn();
            column.Caption = " ";
            column.FieldName = "AASelected";
            column.Visible = true;
            column.VisibleIndex = 0;
            column.OptionsColumn.AllowEdit = true;
            column.Width = 30;
            gridView.Columns.Insert(0, column);
            return gridView;
        }
    }
}
